package com.yunji.news.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunji.news.entity.PaymentRecord;

import java.math.BigDecimal;
import java.util.List;

/**
 * 缴费记录服务接口
 *
 * @author yunji
 * @since 2024-11-26
 */
public interface PaymentRecordService extends IService<PaymentRecord> {

    /**
     * 分页查询缴费记录
     */
    IPage<PaymentRecord> getPaymentPage(Integer page, Integer size, 
                                       Long schoolId, String paymentType, 
                                       String paymentStatus, String keyword);

    /**
     * 创建缴费记录
     */
    boolean createPaymentRecord(PaymentRecord record);

    /**
     * 确认缴费
     */
    boolean confirmPayment(Long id, String transactionId, String receiptUrl);

    /**
     * 申请退费
     */
    boolean applyRefund(Long id, BigDecimal refundAmount, String reason);

    /**
     * 确认退费
     */
    boolean confirmRefund(Long id);

    /**
     * 查询学生缴费状态
     */
    List<PaymentRecord> getStudentPayments(String idCard, Long schoolId);

    /**
     * 查询未缴费学生名单
     */
    List<PaymentRecord> getUnpaidStudents(Long schoolId, Long majorId);
}